﻿<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
<div id="editcell">
    <table class="adminlist">
    <thead>
        <tr>
            <th width="5">
                <?php echo JText::_( 'ID' ); ?>
            </th>
            <th>
				
                <?php echo JText::_( 'Nimi' ); ?>
            </th>
        </tr>            
    </thead>


	<p>Kalenterit | Kalenteriryhmät | Tapahtumat </p>

	
	<h2>Hiihaa</h2>
	

	
	<p>Kalenteriryhmän nimi: 
	<input type="text" name="nimi" id="nimi" size="32" maxlength="250" value="" /></p>

	

     <?php
    $k = 0;
    for ($i=0, $n=count( $this->groups ); $i < $n; $i++)
    {
				$row =& $this->groups[$i];
				$checked    = JHTML::_( 'grid.id', $i, $row->id );
				$link = JRoute::_( 'index.php?option=com_eventcalendar&task=addCalendatTpGroup&id='. $row->id );
				?>
				
        <tr class="<?php echo "row$k"; ?>">
            <td>
			
              <?php echo $checked; ?>
	
			</td>
            <td>
				<td>
                <a href="<?php echo $link; ?>"><?php echo $row->nimi; ?></a>
				</td>
  
            </td>
			
			 <td>
                <?php echo $row->id; ?>
            </td>
        </tr>
        <?php
        $k = 1 - $k;
    }
    ?>
    </table>
	

	
</div>

		<input type="hidden" name="option" value="com_eventcalendar" />                  
		<input type="hidden" name="controller" value="eventcalendar" />                    
		<input type="hidden" name="task" value="addCalendarToGroup" /> 

</form>

	<table>
	<?php	
	
	$k = 0;	
	foreach ($this->calendars as &$row2)
    {
        ?>
        <tr class="<?php echo "row2$k"; ?>">
            <td>
                <?php echo $row2->id; ?>
            </td>
            <td>
                <?php echo $row2->nimi; ?>
            </td>
        </tr>
        <?php
        $k = 1 - $k;
    }
	
    ?>
	</table>